<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>注册</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <script src="https://cdn.bootcss.com/vue/2.5.17-beta.0/vue.min.js"></script>
    <style>
        #header {
            background: #fbdb0a;
            color: #000;
            border-bottom: #b2b2b2 solid 1px;
        }
    </style>
</head>

<body>
    <div v-cloak id="register_one">
        <header id="header" class="aui-bar aui-bar-nav">
            <a class="aui-pull-left">
                <span class="aui-iconfont aui-icon-close" style="color:#000" @click="closeWin"></span>
            </a>
            <div class="aui-title">注册</div>
        </header>
        <section>
            <button @click="nextStep">下一步</button>
            <input type="number" maxlength="11" v-model="input" oninput="if(value.length>11)value=value.slice(0,11)">
            <span>{{state}}</span>
        </section>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript">
apiready = function() {
    header = $api.byId('header');
    //适配iOS 7+，Android 4.4+状态栏
    $api.fixStatusBar(header);
    headerPos = $api.offset(header);

};
var vm = new Vue({
    el: '#register_one',
    data: {
        state: 0,
        input: ''
    },
    methods: {
        closeWin: function() {
            api.closeWin();
        },
        nextStep: function() {
            api.openWin({
                name: 'register_two',
                url: 'register_two.html'
            });
        }
    },
    created: function() {},
    mounted: function() {},
    // watch: {
    //     input (val, oldVal){
    //         if (val.length === 11) {
    //             this.state = 1
    //         }
    //     }
    // }
})
</script>

</html>